Florian D. Schneider
27.08.2014
| filename | last updated |
|---|---|
| project.c | 01.08.2014 |
| filename | last updated |
|---|---|
| project.c | 01.08.2014 |
| project_v0.1.c | 02.08.2014 |
| filename | last updated |
|---|---|
| project.c | 01.08.2014 |
| project_v0.1.c | 02.08.2014 |
| project_v0.2.c | 03.08.2014 |
| project_v0.21.c | 04.08.2014 |
| project_v0.2_sonia.c | 04.08.2014 |
| filename | last updated |
|---|---|
| project.c | 01.08.2014 |
| project_v0.1.c | 02.08.2014 |
| project_v0.2.c | 03.08.2014 |
| project_v0.21.c | 04.08.2014 |
| project_v0.2_sonia.c | 04.08.2014 |
| project_v0.21_s.c | 05.08.2014 |
| filename | last updated |
|---|---|
| project.c | 01.08.2014 |
| project_v0.1.c | 02.08.2014 |
| project_v0.21.c | 04.08.2014 |
| project_v0.2_sonia.c | 04.08.2014 |
| project_v0.21_s.c | 05.08.2014 |
| project_v0.2.c | 07.08.2014 |
There are so many files!
Which one was the latest version?
Did you fix that bug in the right file now?
What version of that function is this?
Which version of the code was used to produce this result?
I still need to do manual back-ups!
I still cannot reproduce what I did!
$ git push origin master
| filename | last updated |
|---|---|
| .git | 01.08.2014 |
| project.c | 01.08.2014 |
| filename | last updated |
|---|---|
| .git | 02.08.2014 |
| project.c | 02.08.2014 |
| filename | last updated |
|---|---|
| .git | 03.08.2014 |
| project.c | 03.08.2014 |
Classic filesystems:
git:
{demo}
instructions to remove or add files
each commit has a unique name: a HASH-tag
#4kjb421kj43cs70sdb93ntl4865gbfse9
meta info:
Types of pointers:
And this is how 'time travelling' works:
And this is how 'time travelling' works:
And this is how 'time travelling' works:
And this is how 'time travelling' works:
What you need to learn:
open a terminal
$
Create a new folder.
$ mkdir test
$ cd test
$
Initialise a git repository.
$ mkdir test
$ cd test
$ git init
Initialized empty Git repository ...
$
check the status!
$ git status
On branch master
Initial commit
Untracked files:
(use "git add <file>..." to include in what will be committed)
test.txt
nothing added to commit but untracked files present (use "git add" to track)
This is a two step process:
staging files for next commit
$ git add test.txt
commit to repository
$ git commit -m "edit test.txt: fix #23"
-m "..." check status again!
$ git status
On branch master
nothing to commit, working directory clean
have a look at your repository tree!
$ git log
commit a9b0697265feb5013eced9c1befb9a10a94a66cb
Author: Florian Schneider <florian.schneider@univ-montp2.fr>
Date: Fri Nov 21 16:30:53 2014 +0100
edit test.txt
(repeat 2 & 3 a couple of times! use git status and git log!)
in same repository:
git log Terminal:
$ git tag -a v1.0 -m "first version of project"
$
continue work:
$ git tag
v1.0
$
$ git tag
v1.0
$ git checkout v1.0
$
look at your files!
$ git tag
v1.0
$ git checkout v1.0
$ git checkout master
$
look at your files!
what you learned:
log and statusand many more: http://git-scm.com/downloads/guis
https://gitlab.info-ufr.univ-montp2.fr/
Bitbucket (free private for small teams)
GitLab Cloud (unlimited free private)
self-hosted git server, and many more
git clone https://github.com/user/repoWhy?